package day09_zy;

public class Rectangle extends Shape{
	private double wide ;				// 宽
	private double longs ;
	//空参和有参构造
	Rectangle() {
		super();
	}
	

	Rectangle(double wide, double longs) {
		super();
		this.wide = wide;
		this.longs = longs;
	}
//getter setter

	//重写抽象类中的方法
	@Override
	public double area() {
		return this.longs * this.wide ;
	}

	public double getWide() {
		return wide;
	}


	public void setWide(double wide) {
		this.wide = wide;
	}


	public double getLongs() {
		return longs;
	}


	public void setLongs(double longs) {
		this.longs = longs;
	}


	@Override
	public double perimeter() {
		return this.longs * 2 + 2*this.wide ;
	}

}
